﻿@model List<HomeWorkDto>
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Index</title>
    <link href="~/lib/bootstrap/css/bootstrap.css" rel="stylesheet" />
</head>
<body>
    <div class="container">
        <table class="table table-bordered">
            <thead>
                <tr>
                    <td>作业编号</td>
                    <td>作业详情</td>
                    <td>publishTime</td>
                    <td>endTime</td>
                    <td>创建时间</td>
                    <td>修改时间</td>
                    <td colspan="2">操作</td>
                </tr>
            </thead>

            <tbody>
                @foreach(var i in Model)
                {
                    <tr>
                        <td>@i.Id</td>
                        <td>@i.Title</td>
                        <td>@i.PublishTime</td>
                        <td>@i.EndTime</td>
                        <td>@i.CreateTime.ToString("yyyy年MM月dd日")</td>
                        <td>@i.UpdateTime.ToString("yyyy年MM月dd日")</td>
                        <td>
                            <a asp-action="Update" asp-controller="HomeWork" asp-route-id="@i.Id">修改</a>
                        </td>
                        <td>
                            <a asp-action="Delete" asp-controller="HomeWork" asp-route-id="@i.Id">删除</a>
                        </td>
                    </tr>
                }
            </tbody>
        </table>

        <div>
            <a asp-action="Add" asp-controller="HomeWork">新增作业信息</a>
        </div>

    </div>
</body>
</html>
